package API.Collection.Set.TreeSet.Arrange.BasicMethod;

import java.util.Set;
import java.util.TreeSet;

public class Test {
    public static void main(String[] args) {
        Set<Student> set = new TreeSet<>();
        Student student1 = new Student("Jack", 18, "2023001");
        Student student2 = new Student("Nick", 20, "2023002");
        Student student3 = new Student("Black", 19, "2023003");
        Student student4 = new Student("Alic", 21, "2023004");
        set.add(student1);
        set.add(student2);
        set.add(student3);
        set.add(student4);
        for (Student student : set) {
            System.out.println(student);
        }
    }
}
